package com.jxust.vhr.controller;

import com.jxust.debate.feign.AdminService;
import com.jxust.debate.util.CommonResult;
import com.jxust.vhr.service.TestService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author tyeerth
 * @date 2020/12/26 - 19:45
 */
@RestController
@RequestMapping("/admin")
public class testhandler {
    //远端调用AdminService的服务
    @Resource
    private AdminService adminService;

    @Resource
    private TestService testService;

    @RequestMapping("/hello")
    public CommonResult hello(){
        return CommonResult.success(" admin 9091 hello");
    }
    @RequestMapping("/testAdmin")
    public String testAdmin(){
        return adminService.hello();
    }
//    @RequestMapping("/testService")
//    public List<DemoEntity> testService(){
//        return testService.getAll();
//    }
}
